package com.heima.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.article.pojos.ApArticle;
import com.heima.model.common.dtos.app.ArticleHomeDto;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
* @author Fu319
* @description 针对表【ap_article(文章信息表，存储已发布的文章)】的数据库操作Mapper
* @createDate 2025-03-31 15:22:12
* @Entity com.heima.model.ApArticle.pojos.ApArticle
*/
@Mapper
public interface ApArticleMapper extends BaseMapper<ApArticle> {

    List<ApArticle> loadArticleList(@Param("articleHomeDto") ArticleHomeDto articleHomeDto,@Param("type")Short type);

    /**
     * 获取前5天的所有文章数据
     * @return
     */
    List<ApArticle> findArticleListByLast5Days(@Param("Last5Days") Date Last5Days);
}




